#include "framework.h"
#include <stdio.h>
#include <process.h>

int SimpleThread::count = 0;

SimpleThread::SimpleThread() {

}

SimpleThread::~SimpleThread() {

}

void SimpleThread::startup() {
	_beginthread(SimpleThread::__run, 0, this);
}

void SimpleThread::__run(void* that) {
	SimpleThread *thread = (SimpleThread*) that;
	count++;
	thread->run();
	count--;
	thread->cleanup();
	Output("SimpleThread count=%d", count);
}

void SimpleThread::exit() {

}

char* ParamAddress::getDescription()
{
	return "";
}

void* ParamAddress::getObject(const String& name) const
{
	if (name == YATOM("ParamAddress"))
		return const_cast<ParamAddress*>(this);
	return RefObject::getObject(name);
}


void* XSIPRequestParam::getObject(const String& name) const
{
	if (name == YATOM("XSIPRequestParam"))
		return const_cast<XSIPRequestParam*>(this);
	return RefObject::getObject(name);
}

void* XSIPResponseParam::getObject(const String& name) const
{
	if (name == YATOM("XSIPResponseParam"))
		return const_cast<XSIPResponseParam*>(this);
	return RefObject::getObject(name);
}